// app.js
// import {$http,$get,$post} from './utils/http'
import * as http from './utils/http'
import fly from './utils/request'
import './utils/init-leancloud'  //初始化LeanCloud
App({
  onLaunch() {
      //尝试提取本地存储用户信息
    wx.getStorage({
        key:'userInfo',
        success:({data})=>{
            if(data){
                this.globalData.userInfo = data
            }
        }
    })
  },
  globalData: {
    userInfo: null
  },
//   $http,
//   $get,
//   $post
  ...http,
  fly
})
